﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;

namespace WPFCABShell.Shell.Interface.Services.Skinning
{
	/// <summary>
	/// Provides services related to application skinning.
	/// </summary>
	/// <remarks>
	/// <para>
	/// The skinning service allows application skins to be registered and enumerated. It also tracks the currently active skin and
	/// raises events as appropriate.
	/// </para>
	/// <para>
	/// Skins are simply a named <see cref="ResourceDictionary"/>. The shell provides the facilities to allow users to switch between
	/// skins, and it will automatically apply resources when a user does so.
	/// </para>
	/// </remarks>
	public interface ISkinningService
	{
		/// <summary>
		/// Gets all registered skins.
		/// </summary>
		IEnumerable<ISkin> Skins
		{
			get;
		}

		/// <summary>
		/// Gets or sets the current skin.
		/// </summary>
		ISkin CurrentSkin
		{
			get;
			set;
		}

		/// <summary>
		/// Occurs whenever a skin is added.
		/// </summary>
		event EventHandler<SkinEventArgs> SkinAdded;

		/// <summary>
		/// Occurs whenever the current skin changes.
		/// </summary>
		event EventHandler<SkinChangedEventArgs> SkinChanged;

		/// <summary>
		/// Adds a skin.
		/// </summary>
		/// <param name="name">
		/// The name of the skin.
		/// </param>
		/// <param name="resourcesType">
		/// The CLR type that is a <see cref="ResourceDictionary"/> containing the skin assets.
		/// </param>
		/// <returns>
		/// An <see cref="ISkin"/> representing the skin.
		/// </returns>
		ISkin Add(string name, Type resourcesType);
	}
}
